export interface IMarker {
  id: string
  childIndex: number
  start: number
  end: number
  parentClassName?: string
}

export interface Styles {
  [key: string]: any
}

export interface Button {
  label: string
  // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
  event: Function
}
export interface WebMarkerOptions {
  // eslint-disable-next-line no-use-before-define
  defaultMarkers: SelectedMarkers
  elemClass: string[]
  markedClassName: string
  selectedClassName: string
  focusMarkedClassName: string
  btns: Button[]
  btnRootID?: string
  btnMarkID?: string
  btnDeleteID?: string
  btnWrapperID?: string
  btnArrowID?: string
  disabledDom?: string[]
}

export interface SelectedMarkers {
  [key: string]: any
}

export interface EventName {
  mousedown: 'mousedown' | 'touchstart'
  mouseup: 'mouseup' | 'touchend'
  mousemove: 'mousemove' | 'touchmove'
}

export interface UserAgaent {
  isAndroid: boolean
  isiOS: boolean
  isPC: boolean
  eventName: EventName
}

export interface IWebMarker {
  getSelectedText: () => string
  getCurrentId: () => string
  getAllMarkers: () => SelectedMarkers
  del: () => void
  hide: () => void
  userAgent: UserAgaent
}
